//
//  WorkReportItemModel.m
//  Utils
//
//  Created by enghou on 2018/6/4.
//  Copyright © 2018年 xyxorigation. All rights reserved.
//

#import "WorkReportItemModel.h"

@implementation WorkReportItemModel

-(instancetype)initWithSource:(NSDictionary *)source{
    self = [super initWithSource:source];
    if (self) {
        self.ids = [self contentForKey:@"id" withSource:source];
        self.title = [self contentForKey:@"title" withSource:source];
        self.workContent = [self contentForKey:@"workContent" withSource:source];
        self.workTime = [self contentForKey:@"workTime" withSource:source];
        self.workUserName = [self contentForKey:@"workUserName" withSource:source];
        CGSize contentSize = [self.workContent caculateSizeWithFont:[UIFont systemFontOfSize:14] MaxSize:CGSizeMake(ScreenWidth - 40, 50)];
        self.height = 62 + contentSize.height + 8;
        self.code = [self contentForKey:@"addWorkDiaryCode" withSource:source];
    }
    return self;
}


@end
